export interface LampConfig {
  type: 'LAMP'
  config: {
    state: 'ON' | 'OFF'
  }
}

export interface TimeConfig {
  hour: number
  minute: number
}

export interface WakeAlarm {
  type: 'WAKE'
  time: TimeConfig
  enable: boolean
}

export interface GeneralAlarm {
  type: 'GENERAL'
  time: TimeConfig
  enable: boolean
  repeat: 'ONCE' | 'DAILY'
  sound: string
  label: string
}

export interface AlarmsConfig {
  type: 'ALARMS'
  config: {
    alarms: (WakeAlarm | GeneralAlarm)[]
  }
}

export interface SleepModeConfig {
  type: 'SLEEP_MODE'
  config: {
    enable: boolean
    durationInSecs?: number
    sound?: string
  }
}

export interface PlantStatusConfig {
  type: 'PLANT_STATUS'
  config: {
    status: 'HEALTHY' | 'THIRSTY'
  }
}

export type DeviceConfigMessage = LampConfig | AlarmsConfig | SleepModeConfig | PlantStatusConfig

